import i18n from '@/lang';
import { token } from '@/utils/storage';
import { Message } from 'element-ui';
import { debounce } from "lodash";

export default class MainErrorStatus {
  public 1001 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.1001").toString());
  })
  public 400 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.400").toString());
  })
  public 100 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.100").toString());
  })
  public 101 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.101").toString());
    token.set("");
    location.href = "/#/login";
  })
  public 102 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.102").toString());
  });
  public 103 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.103").toString());
  });
  public 104 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.104").toString());
  });
  public 105 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.105").toString());
  });
  public 106 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.106").toString());
  });
  public 107 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.107").toString());
  });
  public 108 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.108").toString());
  });
  public 109 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.109").toString());
  });
  public 110 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.110").toString());
  });
  public 111 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.111").toString());
  });
  public 112 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.112").toString());
  });
  public 113 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.113").toString());
  });
  public 114 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.114").toString());
  });
  public 115 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.115").toString());
  });
  public 116 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.116").toString());
  });
  public 117 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.117").toString());
  });
  public 118 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.118").toString());
  });
  public 119 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.119").toString());
  });
  public 120 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.120").toString());
  });
  public 121 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.121").toString());
  });
  public 122 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.122").toString());
  });
  public 123 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.123").toString());
  });
  public 10000 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10000").toString());
  });
  public 10001 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10001").toString());
  });
  public 10002 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10002").toString());
  });
  public 10003 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10003").toString());
  });
  public 10004 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10004").toString());
  });
  public 10005 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10005").toString());
  });
  public 10007 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10007").toString());
  });
  public 10008 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10008").toString());
  });
  public 10006 = debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10006").toString());
  });
  public 10009= debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10009").toString());
  });
  public 10010= debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10010").toString());
  });
  public 10011= debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10011").toString());
  });
  public 10012= debounce(() => {
    Message.warning(i18n.t("main_service.error_status.10012").toString());
  });
}